ReportViewer Sample ASP.NET Server Control

© Copyright Microsoft Corporation, 2004. All rights reserved.

 
The SQL Server documentation team cannot answer technical support questions, but welcomes your suggestions and comments about this readme documentation. You can quickly and directly send e-mail feedback using the link below. All feedback must be in English. To submit written feedback about this document, click here:  Submit feedback.
 

This document contains the release information for the Reporting Services ReportViewer sample. The following sections are included in this Readme:

Overview

ReportViewer is an ASP.NET Server Control developed in Visual Studio .NET. The server control is based on a real-world scenario, and it demonstrates how to develop a custom control that you can use to integrate Reporting Services reports in a Web application. ReportViewer server control uses Reporting Services URL access functionality to render and navigate reports in a Web browser.

Topics

The following bullets briefly describe the Reporting Services technologies used by this sample.

For more information about URL Access in Reporting Services, see "URL Access" in Reporting Services Books Online.

Location

This sample is located in the Applications\ReportViewer subdirectory of the Reporting Services samples directory.

For Example:

C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\Samples\Applications\ReportViewer

Using the sample

In order to properly build and run this sample, the following steps need to be performed.

To create a Web page that contains the ReportViewer Server Control

  1. Open and build ReportViewer.sln in Visual Studio .NET.

  2. Create a new ASP.NET Web Application in Visual Studio .NET.

  3. Add a reference to ReportViewer.dll from the ReportViewer solution \bin folder. To do this, click Add/Remove Toolbox Items on the Tools menu.

    The Customize Toolbar dialog box opens.

  4. From the Customize Toolbar dialog box, select the .NET Framework Components tab and click Browse.

  5. Locate the ReportViewer.dll created in the bin directory of the ReportViewer project folder. Select the ReportViewer.dll and click Open.

    The ReportViewer Server Control is now added to your Toolbox.

  6. From the Toolbox, drag the ReportViewer server control onto the Microsoft Visual Studio .NET 2003 Web Form design surface. This creates a new ReportViewer object on your ASP.NET Web Form.

  7. Set the ReportPath property of the control in the property grid. For example, you can set the property to /Samples/Company Sales.

  8. Set the ServerUrl property in the property grid. For example, you can set the property to http://localhost/reportserver.

    In addition you can set the Parameters, Toolbar, and Zoom properties of the ReportViewer control. These correspond to the HTML Viewer commands of Reporting Services URL Access. For more information about these commands, see "Using URL Access Parameters" in Reporting Services Books Online.

  9. Size the control to render an appropriate report size.

    After you follow these steps, the report is rendered on the Microsoft Visual Studio .NET 2003 Web Form design surface.

  10. Start the ASP.NET Web Application to render the report in your Web browser.

    NOTE: See Microsoft Visual Studio .NET 2003 online help for more details about building a solution or creating a new ASP.NET Web Application.

Notes

For more detailed information about this sample, see "ReportViewer Sample ASP.NET Server Control" in Reporting Services Books Online.